/**
 * Created by Administrator on 2016/4/9.
 */
import java.util.concurrent.*;

public class ProducerConsumerDemo3 {
    public static void main(String[] args) {
        BlockingQueue queue = new ArrayBlockingQueue(1); // 容量为1
        new Thread(new Producer3(queue)).start();
        new Thread(new Consumer3(queue)).start();
    }
}
